package org.cuijq.thinking.in.spring.bean.definition;

import org.cuijq.thinking.in.spring.ioc.domain.User;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeanAliasDemo {
    public static void main(String[] args) {
        BeanFactory beanFactory = new ClassPathXmlApplicationContext("classpath:/META-INF/bean-definitions-context.xml");
        User user =beanFactory.getBean("cuijq-user", User.class);
        User xuser =beanFactory.getBean("user", User.class);
        System.out.println("===:"+(user==xuser));
    }
}
